home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / libraries / dylan / exports.dylan < prev    next >
Encoding:
Text File  |  1995-03-15  |  11.9 KB  |  360 lines  |  [TEXT/ttxt]

  1. module: dylan-user
  2. rcs-header: $Header: exports.dylan,v 1.58 94/12/10 15:44:08 nkramer Exp $
  3.  
  4. //======================================================================
  5. //
  6. // Copyright (c) 1994  Carnegie Mellon University
  7. // All rights reserved.
  8. // 
  9. // Use and copying of this software and preparation of derivative
  10. // works based on this software are permitted, including commercial
  11. // use, provided that the following conditions are observed:
  12. // 
  13. // 1. This copyright notice must be retained in full on any copies
  14. //    and on appropriate parts of any derivative works.
  15. // 2. Documentation (paper or online) accompanying any system that
  16. //    incorporates this software, or any part of it, must acknowledge
  17. //    the contribution of the Gwydion Project at Carnegie Mellon
  18. //    University.
  19. // 
  20. // This software is made available "as is".  Neither the authors nor
  21. // Carnegie Mellon University make any warranty about the software,
  22. // its performance, or its conformity to any specification.
  23. // 
  24. // Bug reports, questions, comments, and suggestions should be sent by
  25. // E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  26. //
  27. //======================================================================
  28. //
  29. //  This file contains the library and module definitions for the
  30. // Dylan library.
  31. //
  32.  
  33. define library Dylan
  34.   export
  35.     Dylan, Extensions, System, File-Descriptors, Threads, Introspection,
  36.     Cheap-IO, Extern;
  37. end Dylan;
  38.  
  39. define module Builtin-Stuff
  40.   export
  41.     \*, \+, \-, \/, \<, \<=, \=, \==, \~=,
  42.     $maximum-fixed-integer, $minimum-fixed-integer,
  43.     <array>,
  44.     <boolean>, <buffer>, <byte-character>, <byte-string>, <byte-vector>,
  45.     <character>, <class>, <collection>, <complex>,
  46.     <defined-class>, <double-float>,
  47.     <empty-list>, <event>, <explicit-key-collection>, <extended-float>,
  48.     <extended-integer>,
  49.     <false>, <fixed-integer>, <float>, <function>,
  50.     <generic-function>,
  51.     <integer>,
  52.     <limited-integer>, <list>, <lock>,
  53.     <method>, <mutable-collection>, <mutable-explicit-key-collection>,
  54.     <mutable-sequence>,
  55.     <number>,
  56.     <object>,
  57.     <pair>,
  58.     <ratio>, <rational>, <real>,
  59.     <sequence>, <simple-object-vector>, <single-float>, <singleton>,
  60.     <slot-descriptor>, <spinlock>, <string>, <subclass>, <symbol>,
  61.     <thread>, <true>, <type>,
  62.     <unicode-string>, <union>,
  63.     <vector>,
  64.     <weak-pointer>,
  65.     $permanent-hash-state,
  66.     add-method, all-superclasses, applicable-method?, apply,
  67.     apply-curry, as, ash,
  68.     binary-logand, binary-logior, binary-logxor, broadcast-event,
  69.     direct-subclasses, direct-superclasses,
  70.     ceiling, ceiling/, class-name, copy-bytes, current-handler, current-thread,
  71.     denominator, do-next-method,
  72.     element, element-setter, enable-error-system,
  73.     fflush, find-method, float-hash, floor, floor/, format, function-arguments,
  74.     function-name,
  75.     generic-function-mandatory-keywords, generic-function-methods,
  76.     getc, grab-lock,
  77.     handler-function, handler-init-args, handler-next, handler-test,
  78.     handler-type, head, head-setter,
  79.     initialize, instance?, invoke-debugger,
  80.     kill-thread,
  81.     limited, limited-integer-class, limited-integer-min, limited-integer-max,
  82.     list, locked?, logand, logbit?, logior, lognot, logxor,
  83.     main, make, make-generic-function, merge-hash-codes, method-specializers,
  84.     negative, numerator,
  85.     object-address, object-class, object-hash,
  86.     pair, prin1, print, putc, puts,
  87.     raw-exit, release-lock, remove-method, round, round/,
  88.     signal-event, singleton, singleton-object, size, slot-allocation,
  89.     slot-descriptors, slot-getter, slot-getter-method, slot-initialized?,
  90.     slot-name, slot-setter, slot-setter-method, slot-type, slot-value,
  91.     slot-value-setter, sorted-applicable-methods, spawn-thread, state-valid?,
  92.     subclass-of, subtype?,
  93.     tail, tail-setter, truncate, truncate/,
  94.     union, union-members,
  95.     values, vector,
  96.     wait-for-event, weak-pointer-object,
  97.     fd-close, fd-error-string, fd-input-available?, fd-open,
  98.     fd-read, fd-seek, fd-sync-output, fd-write, fd-exec,
  99.     L_SET, L_INCR, L_XTND, FNDELAY, FAPPEND, FCREAT, FTRUNC, FEXCL, O_RDONLY,
  100.     O_WRONLY, O_RDWR, O_NDELAY, O_APPEND, O_CREAT, O_TRUNC, O_EXCL,
  101.     ENOENT, EIO, ENXIO, EACCES, EFAULT, EEXIST, ENOTDIR, EISDIR,
  102.     EINVAL, ENFILE, EMFILE, ETXTBSY, ENOSPC, EROFS, EOPNOTSUPP, ELOOP,
  103.     ENAMETOOLONG, EDQUOT, EBADF, EINTR, EPIPE, EFBIG, // EWOULDBLOCK, 
  104.     <foreign-file>, <c-function>, <statically-typed-pointer>, signed-byte-at,
  105.     signed-short-at, signed-long-at, unsigned-byte-at, unsigned-short-at,
  106.     unsigned-long-at, signed-byte-at-setter, signed-short-at-setter,
  107.     signed-long-at-setter, unsigned-byte-at-setter, unsigned-short-at-setter,
  108.     unsigned-long-at-setter, pointer-at, pointer-at-setter, c-pointer-slot,
  109.     c-pointer-slot-setter, load-object-file, null-pointer, find-c-pointer,
  110.     find-c-function, constrain-c-function;
  111.   create
  112.     aref, aref-setter, do, error, type-error,
  113.     make-next-method-function, generic-apply,
  114.     forward-iteration-protocol, backward-iteration-protocol, 
  115.     table-protocol, negative?,
  116.     debugger-flush, debugger-call, debugger-print, debugger-report-condition,
  117.     debugger-abort, debugger-describe-restarts, debugger-restart,
  118.     debugger-return, debugger-eval,
  119.     on-exit, exit;
  120. end Builtin-Stuff;
  121.  
  122.  
  123. define module extras
  124.   create
  125.     *format-function*, *force-output-function*, *debug-output*,
  126.     report-condition;
  127. end;
  128.  
  129.  
  130. define module Dylan
  131.   use Builtin-Stuff,
  132.     import: all,
  133.     export: {\*, \+, \-, \/, \<, \<=, \=, \==, \~=,
  134.          <array>,
  135.          <byte-string>,
  136.          <character>, <class>, <collection>, <complex>,
  137.          <double-float>,
  138.          <empty-list>, <explicit-key-collection>, <extended-float>,
  139.          <float>, <function>,
  140.          <generic-function>,
  141.          <integer>,
  142.          <list>,
  143.          <method>, <mutable-collection>, <mutable-explicit-key-collection>,
  144.          <mutable-sequence>,
  145.          <number>,
  146.          <object>,
  147.          <pair>,
  148.          <ratio>, <rational>, <real>,
  149.          <sequence>, <simple-object-vector>, <single-float>, <singleton>,
  150.          <string>, <symbol>,
  151.          <type>,
  152.          <unicode-string>,
  153.          <vector>,
  154.          $permanent-hash-state,
  155.          add-method, all-superclasses, applicable-method?, apply,
  156.          aref, aref-setter, as, ash,
  157.          backward-iteration-protocol,
  158.          direct-subclasses, direct-superclasses,
  159.          ceiling, ceiling/,
  160.          denominator, do,
  161.          element, element-setter, error,
  162.          find-method, floor, floor/, forward-iteration-protocol,
  163.          function-arguments,
  164.          generic-function-mandatory-keywords, generic-function-methods,
  165.          head, head-setter,
  166.          initialize, instance?,
  167.          limited, list, logand, logbit?, logior, lognot, logxor,
  168.          make, merge-hash-codes, method-specializers,
  169.          negative, negative?, numerator,
  170.          object-class, object-hash,
  171.          pair,
  172.          remove-method, round, round/,
  173.          singleton, size, slot-initialized?, sorted-applicable-methods,
  174.          subtype?,
  175.          table-protocol, tail, tail-setter, truncate, truncate/,
  176.          union,
  177.          values, vector};
  178.   use extras;
  179.   export
  180.     \>=, \>, \:=, \|, \&, \^,
  181.     <abort>,
  182.     <condition>,
  183.     <deque>,
  184.     <error>,
  185.     <range>, <restart>,
  186.     <serious-condition>, <simple-error>, <simple-restart>,
  187.     <simple-warning>, <stretchy-collection>, <stretchy-vector>,
  188.     <type-error>,
  189.     <warning>,
  190.     abort, abs, add, add!, add-new, add-new!, always, any?, as-lowercase,
  191.     as-lowercase!, as-uppercase, as-uppercase!,
  192.     break,
  193.     cerror, check-type, choose, choose-by,
  194.     class-for-copy, complement, compose, concatenate, concatenate-as,
  195.     condition-format-string, condition-format-arguments, conjoin,
  196.     copy-sequence, curry,
  197.     default-handler, dimension, dimensions, disjoin, do-handlers,
  198.     empty?, even?, every?,
  199.     fill!, find-key, first, first-setter,
  200.     gcd,
  201.     identity, integral?, intersection,
  202.     key-sequence, key-test,
  203.     last, last-setter, lcm,
  204.     map, map-as, map-into, max, member?, min, modulo,
  205.     odd?,
  206.     pop, pop-last, positive?, push, push-last,
  207.     range, rank, rcurry, reduce, reduce1, remainder, remove,
  208.     remove!, remove-duplicates, remove-duplicates!,
  209.     replace-elements!, replace-subsequence!, restart-query,
  210.     return-allowed?, return-description, return-query, reverse, reverse!,
  211.     row-major-index,
  212.     second, second-setter, shallow-copy, signal, size-setter, sort, sort!,
  213.     subsequence-position,
  214.     third, third-setter, type-error-value,
  215.     type-error-expected-type,
  216.     zero?;
  217.   create
  218.     /* <ratio>, rationalize, numerator, denominator, */
  219.     <object-table>, <table>, remove-key!;
  220. end Dylan;
  221.  
  222. define module Extensions
  223.   use Dylan;
  224.   use Builtin-Stuff,
  225.     import: {main, exit, on-exit,
  226.          $maximum-fixed-integer, $minimum-fixed-integer,
  227.          <byte-character>, <byte-vector>,
  228.          <boolean>, <true>, <false>,
  229.          <fixed-integer>, <extended-integer>,
  230.          <weak-pointer>, weak-pointer-object},
  231.     export: all;
  232.   use extras,
  233.     export: all;
  234.   create
  235.     <equal-table>, equal-hash, collection-hash, 
  236.     <value-table>, value-hash, sequence-hash, string-hash;
  237.   export
  238.     one-of, type-or, false-or, ignore, key-exists?, <dictionary>;
  239. end Extensions;
  240.  
  241. define module System
  242.   use Dylan;
  243.   use Builtin-Stuff,
  244.     import: {<buffer>, copy-bytes},
  245.     export: all;
  246. end System;
  247.  
  248. define module File-Descriptors
  249.   use Dylan;
  250.   use Builtin-Stuff,
  251.     import: {fd-close, fd-error-string, fd-input-available?,
  252.          fd-open, fd-read, fd-seek, fd-sync-output, fd-write, fd-exec,
  253.  
  254.          // Lseek call.
  255.          //
  256.          L_SET, L_INCR, L_XTND,
  257.  
  258.          // Flags also for fcntl call.
  259.          //
  260.          FNDELAY, FAPPEND,
  261.  
  262.          // Open only modes.
  263.          //
  264.          FCREAT, FTRUNC, FEXCL,
  265.  
  266.          // Open call.
  267.          //
  268.          O_RDONLY, O_WRONLY, O_RDWR, O_NDELAY, O_APPEND, O_CREAT, O_TRUNC,
  269.          O_EXCL,
  270.  
  271.          // Open errors.
  272.          //
  273.          ENOENT, EIO, ENXIO, EACCES, EFAULT, EEXIST, ENOTDIR, EISDIR,
  274.          EINVAL, ENFILE, EMFILE, ETXTBSY, ENOSPC, EROFS, EOPNOTSUPP, ELOOP,
  275.          ENAMETOOLONG, EDQUOT,
  276.  
  277.          // Close errors.
  278.          //
  279.          EBADF,
  280.  
  281.          // Read errors (that are also not Open or Close errors).
  282.          //
  283.          EINTR,
  284.          // EWOULDBLOCK,
  285.  
  286.          // Write errors (that are not also open, close, or read errors).
  287.          //
  288.          EPIPE,
  289.          EFBIG},
  290.     export: all;
  291. end File-Descriptors;
  292.  
  293.  
  294. define module Threads
  295.   use Dylan;
  296.   use Extensions;
  297.   use Builtin-Stuff,
  298.     import: {<thread>, spawn-thread, current-thread, kill-thread,
  299.          <lock>, <spinlock>,
  300.          locked?, grab-lock, release-lock,
  301.          <event>, wait-for-event, signal-event, broadcast-event},
  302.     export: all;
  303.   export
  304.     <multilock>, <semaphore>;
  305. end;
  306.  
  307.  
  308. define module Hash-Tables
  309.   use Dylan;
  310.   use Builtin-Stuff, import: {state-valid?, float-hash};
  311.   use Extensions;
  312. end;
  313.  
  314.  
  315. define module Introspection
  316.   use Builtin-Stuff,
  317.     import: {<defined-class>, <slot-descriptor>,
  318.          class-name, function-name,
  319.          slot-allocation, slot-descriptors, slot-getter,
  320.          slot-getter-method, slot-name, slot-setter, slot-setter-method,
  321.          slot-type, slot-value, slot-value-setter,
  322.  
  323.          object-address,
  324.  
  325.          singleton-object,
  326.          <subclass>, subclass-of,
  327.          <limited-integer>, limited-integer-class, limited-integer-min,
  328.          limited-integer-max,
  329.          <union>, union-members},
  330.     export: all;
  331. end;
  332.  
  333.  
  334. define module Cheap-IO
  335.   use Builtin-Stuff,
  336.     import: {fflush, format, prin1, print, putc, puts, getc},
  337.     export: all;
  338. end;
  339.  
  340. define module Extern
  341.   use Dylan;
  342.   use Builtin-Stuff,
  343.     import: {<foreign-file>, <c-function>, <statically-typed-pointer>,
  344.          signed-byte-at, signed-short-at, signed-long-at, 
  345.          unsigned-byte-at, unsigned-short-at, unsigned-long-at, 
  346.          signed-byte-at-setter, signed-short-at-setter,
  347.          signed-long-at-setter, 
  348.          unsigned-byte-at-setter, unsigned-short-at-setter,
  349.          unsigned-long-at-setter,
  350.          pointer-at, pointer-at-setter,
  351.          c-pointer-slot, c-pointer-slot-setter,
  352.          load-object-file, null-pointer,
  353.          find-c-pointer, find-c-function, constrain-c-function},
  354.     export: all;
  355.   use Extensions;
  356.   export
  357.     <machine-pointer>, <c-string>, destroy, content-size, structure-size,
  358.     import-value, export-value, pointer-value, pointer-value-setter;
  359. end module Extern;
  360.